function _typeof(obj) {
  '@babel/helpers - typeof';
  return (
    (_typeof =
      'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator
        ? function (obj) {
            return typeof obj;
          }
        : function (obj) {
            return obj &&
              'function' == typeof Symbol &&
              obj.constructor === Symbol &&
              obj !== Symbol.prototype
              ? 'symbol'
              : typeof obj;
          }),
    _typeof(obj)
  );
}
function _defineProperty(obj, key, value) {
  key = _toPropertyKey(key);
  if (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true,
    });
  } else {
    obj[key] = value;
  }
  return obj;
}
function _toPropertyKey(arg) {
  var key = _toPrimitive(arg, 'string');
  return _typeof(key) === 'symbol' ? key : String(key);
}
function _toPrimitive(input, hint) {
  if (_typeof(input) !== 'object' || input === null) return input;
  var prim = input[Symbol.toPrimitive];
  if (prim !== undefined) {
    var res = prim.call(input, hint || 'default');
    if (_typeof(res) !== 'object') return res;
    throw new TypeError('@@toPrimitive must return a primitive value.');
  }
  return (hint === 'string' ? String : Number)(input);
}
import classnames from 'classnames';
import React from 'react';
import './index.less';

/**
 * 空态
 */
export default function Empty(_ref) {
  var _classnames;
  var _ref$type = _ref.type,
    type = _ref$type === void 0 ? 'normal' : _ref$type,
    _ref$size = _ref.size,
    size = _ref$size === void 0 ? 'large' : _ref$size,
    _ref$description = _ref.description,
    description = _ref$description === void 0 ? '暂无相关内容' : _ref$description,
    extra = _ref.extra,
    children = _ref.children,
    className = _ref.className,
    style = _ref.style,
    imageStyle = _ref.imageStyle;
  var emptyClassName = classnames(
    'szzj-empty',
    className,
    ((_classnames = {}),
    _defineProperty(_classnames, 'szzj-empty-'.concat(size), true),
    _defineProperty(_classnames, 'szzj-empty-'.concat(type), type !== 'normal'),
    _classnames),
  );
  return /*#__PURE__*/ React.createElement(
    'div',
    {
      className: emptyClassName,
      style: style,
    },
    /*#__PURE__*/ React.createElement('div', {
      className: 'szzj-empty-image',
      style: imageStyle,
    }),
    /*#__PURE__*/ React.createElement(
      'div',
      {
        className: 'szzj-empty-description',
      },
      description,
    ),
    (extra || children) &&
      /*#__PURE__*/ React.createElement(
        'div',
        {
          className: 'szzj-empty-extra',
        },
        children || extra,
      ),
  );
}
